#include<stdio.h>
#include<algorithm>
using namespace std;
const int maxn=1e5+10;
int main()
{
	int sum=0,ans=0;
	for(int i=1949;i<=2012;i++){
		if(i%400==0||i%100!=0&&i%4==0)
			sum+=366;
		else 
			sum+=365;
		if((sum+1)%7==0)
			ans++;
	}
	printf("%d",ans);
	return 0;
}
